using UnityEngine;
using System.Collections;

public class ShowHUD : MonoBehaviour
{

    [HideInInspector]
    public bool showHUD = false;        // variable para controlar si se muestra o no el hud
   
    [HideInInspector]
    public GUITexture texture;

    void Start()
    {
        
//        GUITexture.texture = Resources.Load("Acc_M") as Texture;          // la textura se carga en el padre
    }

    void Update()
    {
        transform.position = Camera.main.WorldToViewportPoint(transform.parent.position);

        if (showHUD)
        {
            texture.enabled = true;
        }
        else
        {
            texture.enabled = false;
        }

    }
}
